package com.company.Thread;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName DataStructure
 * @Description: TODO
 * @date ${DAT}0:36
 * 1、多线程的创建：方式一，继承与Thread类
 * 2、重写Thread的run()
 * 3、创建Thread类的子类的对象
 * 4、通过此对象调用start()
 */

public class ThreadTest extends Thread{
    @Override
    public void run() {
        for (int i = 0; i <= 100; i++){
            if (i % 2 == 0 ){
                System.out.println(Thread.currentThread().getName()+":"+i);
            }
        }
    }
}
